<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // constructor  单词 构造函数
    function Pig(one, two) {
      this.one = one
      this.two = two
    }
    const res = new Pig('佩奇', 20)
    console.log(res);
    Pig.prototype.sing = function () {
      console.log('啦啦啦');
    }
    console.log(Pig.prototype.constructor);
  </script>
</body>

</html>